<?php 
if(isset($categoria)){
	$id = $categoria->id;
	$nome = $categoria->nome;
}
?>
<h2>
	<span>Editar Categoria</span>
</h2>
<?php echo validation_errors('',''); ?>
<div class="clr"></div>
<?php echo form_open("javascript:gravar();",array("id"=>"formulario"));?>
<?php echo form_hidden("id",$id);?>
<table>
	<tr>
		<td><?php echo form_label("Nome","nome");?>
		</td>
		<td><?php echo form_input(array("name"=>"nome","id"=>"nome","value"=>$nome))?>
		</td>
	</tr>
	<tr>
		<td align="right" colspan="2">
			<?php echo form_button(array("onclick"=>"excluir({$id});"),"Excluir");?>
			<?php echo form_button(array("onclick"=>"gravar();"),"Atualizar");?>
		</td>
	</tr>
</table>
<?php echo form_close();?>